package com.daylightrobbery.utils;

import com.daylightrobbery.server.entity.IpDetails;

public class LogUtils {

    public static IpDetails getIpDetails(String ip){
        String url = "https://whois.pconline.com.cn/ipJson.jsp?ip=" + ip + "&json=true";

        String s = HttpClientUtil2.sendGet(url);

        System.out.println("====:" + s);
        IpDetails ipDetails = ObjectMapperUtil.toObject(s, IpDetails.class);
        return ipDetails;
    }

    public static void main(String[] args) {
        System.out.println(getIpDetails("114.114.114.114"));
    }
}
